/**
 * 查看图书
 * @param params
 * @returns {*}
 */
function fetchBooks (authorId) {
  return $axios({
    url: '/author/book',
    method: 'get',
    params: {
      authorId: authorId
    }
  })
}
/**
 * 查看最新图书
 * @param params
 * @returns {*}
 */
function fetchBook (authorId) {
  return $axios({
    url: '/author/bookByTime',
    method: 'get',
    params: {
      authorId: authorId
    }
  })
}
// 添加图书
const addBook = (params) => {
  return $axios({
    url: '/author',
    method: 'POST',
    data: { ...params }
  })
}
